﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDbViewport : OdDbEntity
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbViewport(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDbViewport_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbViewport obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbViewport()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDbViewport(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdDbViewport cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbViewport_cast(OdRxObject.getCPtr(pObj));
			OdDbViewport result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbViewport)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbViewport)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbViewport)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbViewport_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbViewport_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbViewport_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdDbViewport createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbViewport_createObject();
			OdDbViewport result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbViewport)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbViewport)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbViewport)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double height()
		{
			double result = TD_DbPINVOKE.OdDbViewport_height(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setHeight(double height)
		{
			TD_DbPINVOKE.OdDbViewport_setHeight(this.swigCPtr, height);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double width()
		{
			double result = TD_DbPINVOKE.OdDbViewport_width(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setWidth(double width)
		{
			TD_DbPINVOKE.OdDbViewport_setWidth(this.swigCPtr, width);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePoint3d centerPoint()
		{
			OdGePoint3d result = new OdGePoint3d(TD_DbPINVOKE.OdDbViewport_centerPoint(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setCenterPoint(OdGePoint3d centerPoint)
		{
			TD_DbPINVOKE.OdDbViewport_setCenterPoint(this.swigCPtr, OdGePoint3d.getCPtr(centerPoint));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public short number()
		{
			short result = TD_DbPINVOKE.OdDbViewport_number(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setOn()
		{
			TD_DbPINVOKE.OdDbViewport_setOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setOff()
		{
			TD_DbPINVOKE.OdDbViewport_setOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePoint3d viewTarget()
		{
			OdGePoint3d result = new OdGePoint3d(TD_DbPINVOKE.OdDbViewport_viewTarget(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setViewTarget(OdGePoint3d viewTarget)
		{
			TD_DbPINVOKE.OdDbViewport_setViewTarget(this.swigCPtr, OdGePoint3d.getCPtr(viewTarget));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeVector3d viewDirection()
		{
			OdGeVector3d result = new OdGeVector3d(TD_DbPINVOKE.OdDbViewport_viewDirection(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setViewDirection(OdGeVector3d viewDirection)
		{
			TD_DbPINVOKE.OdDbViewport_setViewDirection(this.swigCPtr, OdGeVector3d.getCPtr(viewDirection));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double viewHeight()
		{
			double result = TD_DbPINVOKE.OdDbViewport_viewHeight(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setViewHeight(double viewHeight)
		{
			TD_DbPINVOKE.OdDbViewport_setViewHeight(this.swigCPtr, viewHeight);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePoint2d viewCenter()
		{
			OdGePoint2d result = new OdGePoint2d(TD_DbPINVOKE.OdDbViewport_viewCenter(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setViewCenter(OdGePoint2d viewCenter)
		{
			TD_DbPINVOKE.OdDbViewport_setViewCenter(this.swigCPtr, OdGePoint2d.getCPtr(viewCenter));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double twistAngle()
		{
			double result = TD_DbPINVOKE.OdDbViewport_twistAngle(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTwistAngle(double twistAngle)
		{
			TD_DbPINVOKE.OdDbViewport_setTwistAngle(this.swigCPtr, twistAngle);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double lensLength()
		{
			double result = TD_DbPINVOKE.OdDbViewport_lensLength(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLensLength(double lensLength)
		{
			TD_DbPINVOKE.OdDbViewport_setLensLength(this.swigCPtr, lensLength);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isFrontClipOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isFrontClipOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setFrontClipOn()
		{
			TD_DbPINVOKE.OdDbViewport_setFrontClipOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setFrontClipOff()
		{
			TD_DbPINVOKE.OdDbViewport_setFrontClipOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isBackClipOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isBackClipOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBackClipOn()
		{
			TD_DbPINVOKE.OdDbViewport_setBackClipOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setBackClipOff()
		{
			TD_DbPINVOKE.OdDbViewport_setBackClipOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isFrontClipAtEyeOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isFrontClipAtEyeOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setFrontClipAtEyeOn()
		{
			TD_DbPINVOKE.OdDbViewport_setFrontClipAtEyeOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setFrontClipAtEyeOff()
		{
			TD_DbPINVOKE.OdDbViewport_setFrontClipAtEyeOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double frontClipDistance()
		{
			double result = TD_DbPINVOKE.OdDbViewport_frontClipDistance(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setFrontClipDistance(double frontClipDistance)
		{
			TD_DbPINVOKE.OdDbViewport_setFrontClipDistance(this.swigCPtr, frontClipDistance);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double backClipDistance()
		{
			double result = TD_DbPINVOKE.OdDbViewport_backClipDistance(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBackClipDistance(double backClipDistance)
		{
			TD_DbPINVOKE.OdDbViewport_setBackClipDistance(this.swigCPtr, backClipDistance);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isPerspectiveOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isPerspectiveOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setPerspectiveOn()
		{
			TD_DbPINVOKE.OdDbViewport_setPerspectiveOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setPerspectiveOff()
		{
			TD_DbPINVOKE.OdDbViewport_setPerspectiveOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isUcsFollowModeOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isUcsFollowModeOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setUcsFollowModeOn()
		{
			TD_DbPINVOKE.OdDbViewport_setUcsFollowModeOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUcsFollowModeOff()
		{
			TD_DbPINVOKE.OdDbViewport_setUcsFollowModeOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isUcsIconVisible()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isUcsIconVisible(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setUcsIconVisible()
		{
			TD_DbPINVOKE.OdDbViewport_setUcsIconVisible(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUcsIconInvisible()
		{
			TD_DbPINVOKE.OdDbViewport_setUcsIconInvisible(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isUcsIconAtOrigin()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isUcsIconAtOrigin(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setUcsIconAtOrigin()
		{
			TD_DbPINVOKE.OdDbViewport_setUcsIconAtOrigin(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUcsIconAtCorner()
		{
			TD_DbPINVOKE.OdDbViewport_setUcsIconAtCorner(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isFastZoomOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isFastZoomOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setFastZoomOn()
		{
			TD_DbPINVOKE.OdDbViewport_setFastZoomOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setFastZoomOff()
		{
			TD_DbPINVOKE.OdDbViewport_setFastZoomOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public ushort circleSides()
		{
			ushort result = TD_DbPINVOKE.OdDbViewport_circleSides(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setCircleSides(ushort circleSides)
		{
			TD_DbPINVOKE.OdDbViewport_setCircleSides(this.swigCPtr, circleSides);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isSnapOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isSnapOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setSnapOn()
		{
			TD_DbPINVOKE.OdDbViewport_setSnapOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setSnapOff()
		{
			TD_DbPINVOKE.OdDbViewport_setSnapOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isSnapIsometric()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isSnapIsometric(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setSnapIsometric()
		{
			TD_DbPINVOKE.OdDbViewport_setSnapIsometric(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setSnapStandard()
		{
			TD_DbPINVOKE.OdDbViewport_setSnapStandard(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double snapAngle()
		{
			double result = TD_DbPINVOKE.OdDbViewport_snapAngle(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setSnapAngle(double snapAngle)
		{
			TD_DbPINVOKE.OdDbViewport_setSnapAngle(this.swigCPtr, snapAngle);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePoint2d snapBasePoint()
		{
			OdGePoint2d result = new OdGePoint2d(TD_DbPINVOKE.OdDbViewport_snapBasePoint(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setSnapBasePoint(OdGePoint2d snapBasePoint)
		{
			TD_DbPINVOKE.OdDbViewport_setSnapBasePoint(this.swigCPtr, OdGePoint2d.getCPtr(snapBasePoint));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeVector2d snapIncrement()
		{
			OdGeVector2d result = new OdGeVector2d(TD_DbPINVOKE.OdDbViewport_snapIncrement(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setSnapIncrement(OdGeVector2d snapIncrement)
		{
			TD_DbPINVOKE.OdDbViewport_setSnapIncrement(this.swigCPtr, OdGeVector2d.getCPtr(snapIncrement).Handle);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public ushort snapIsoPair()
		{
			ushort result = TD_DbPINVOKE.OdDbViewport_snapIsoPair(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setSnapIsoPair(ushort snapIsoPair)
		{
			TD_DbPINVOKE.OdDbViewport_setSnapIsoPair(this.swigCPtr, snapIsoPair);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isGridOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isGridOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setGridOn()
		{
			TD_DbPINVOKE.OdDbViewport_setGridOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setGridOff()
		{
			TD_DbPINVOKE.OdDbViewport_setGridOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeVector2d gridIncrement()
		{
			OdGeVector2d result = new OdGeVector2d(TD_DbPINVOKE.OdDbViewport_gridIncrement(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setGridIncrement(OdGeVector2d gridIncrement)
		{
			TD_DbPINVOKE.OdDbViewport_setGridIncrement(this.swigCPtr, OdGeVector2d.getCPtr(gridIncrement).Handle);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool hiddenLinesRemoved()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_hiddenLinesRemoved(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void showHiddenLines()
		{
			TD_DbPINVOKE.OdDbViewport_showHiddenLines(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void removeHiddenLines()
		{
			TD_DbPINVOKE.OdDbViewport_removeHiddenLines(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void freezeLayersInViewport(OdDbObjectIdArray layerIds)
		{
			TD_DbPINVOKE.OdDbViewport_freezeLayersInViewport(this.swigCPtr, OdDbObjectIdArray.getCPtr(layerIds));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void thawLayersInViewport(OdDbObjectIdArray layerIds)
		{
			TD_DbPINVOKE.OdDbViewport_thawLayersInViewport(this.swigCPtr, OdDbObjectIdArray.getCPtr(layerIds));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void thawAllLayersInViewport()
		{
			TD_DbPINVOKE.OdDbViewport_thawAllLayersInViewport(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isLayerFrozenInViewport(OdDbObjectId layerId)
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isLayerFrozenInViewport(this.swigCPtr, OdDbObjectId.getCPtr(layerId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getFrozenLayerList(OdDbObjectIdArray layerIds)
		{
			TD_DbPINVOKE.OdDbViewport_getFrozenLayerList(this.swigCPtr, OdDbObjectIdArray.getCPtr(layerIds));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void updateDisplay()
		{
			TD_DbPINVOKE.OdDbViewport_updateDisplay(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual uint subSetAttributes(OdGiDrawableTraits pTraits)
		{
			uint result = TD_DbPINVOKE.OdDbViewport_subSetAttributes(this.swigCPtr, OdGiDrawableTraits.getCPtr(pTraits));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool subWorldDraw(OdGiWorldDraw pWd)
		{
			bool result = TD_DbPINVOKE.OdDbViewport_subWorldDraw(this.swigCPtr, OdGiWorldDraw.getCPtr(pWd));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isLocked()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isLocked(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLocked()
		{
			TD_DbPINVOKE.OdDbViewport_setLocked(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUnlocked()
		{
			TD_DbPINVOKE.OdDbViewport_setUnlocked(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isTransparent()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isTransparent(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTransparent()
		{
			TD_DbPINVOKE.OdDbViewport_setTransparent(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setOpaque()
		{
			TD_DbPINVOKE.OdDbViewport_setOpaque(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double customScale()
		{
			double result = TD_DbPINVOKE.OdDbViewport_customScale(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setCustomScale(double customScale)
		{
			TD_DbPINVOKE.OdDbViewport_setCustomScale(this.swigCPtr, customScale);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbViewport.StandardScaleType standardScale()
		{
			OdDbViewport.StandardScaleType result = (OdDbViewport.StandardScaleType)TD_DbPINVOKE.OdDbViewport_standardScale(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setStandardScale(OdDbViewport.StandardScaleType standardScale)
		{
			TD_DbPINVOKE.OdDbViewport_setStandardScale(this.swigCPtr, (int)standardScale);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public string plotStyleSheet()
		{
			string result = TD_DbPINVOKE.OdDbViewport_plotStyleSheet(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public string effectivePlotStyleSheet()
		{
			string result = TD_DbPINVOKE.OdDbViewport_effectivePlotStyleSheet(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setPlotStyleSheet(string plotStyleSheetName)
		{
			TD_DbPINVOKE.OdDbViewport_setPlotStyleSheet(this.swigCPtr, plotStyleSheetName);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isNonRectClipOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isNonRectClipOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setNonRectClipOn()
		{
			TD_DbPINVOKE.OdDbViewport_setNonRectClipOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setNonRectClipOff()
		{
			TD_DbPINVOKE.OdDbViewport_setNonRectClipOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId nonRectClipEntityId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbViewport_nonRectClipEntityId(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setNonRectClipEntityId(OdDbObjectId clipEntityId)
		{
			TD_DbPINVOKE.OdDbViewport_setNonRectClipEntityId(this.swigCPtr, OdDbObjectId.getCPtr(clipEntityId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getUcs(OdGePoint3d origin, OdGeVector3d xAxis, OdGeVector3d yAxis)
		{
			TD_DbPINVOKE.OdDbViewport_getUcs(this.swigCPtr, OdGePoint3d.getCPtr(origin), OdGeVector3d.getCPtr(xAxis), OdGeVector3d.getCPtr(yAxis));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isUcsOrthographic(out OrthographicView viewType, OdDbDatabase pDb)
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isUcsOrthographic__SWIG_0(this.swigCPtr, out viewType, OdDbDatabase.getCPtr(pDb));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isUcsOrthographic(out OrthographicView viewType)
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isUcsOrthographic__SWIG_1(this.swigCPtr, out viewType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId ucsName()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbViewport_ucsName(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double elevation()
		{
			double result = TD_DbPINVOKE.OdDbViewport_elevation(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setUcs(OdGePoint3d origin, OdGeVector3d xAxis, OdGeVector3d yAxis)
		{
			TD_DbPINVOKE.OdDbViewport_setUcs__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(origin), OdGeVector3d.getCPtr(xAxis), OdGeVector3d.getCPtr(yAxis));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUcs(OrthographicView viewType, OdDbDatabase pDb)
		{
			TD_DbPINVOKE.OdDbViewport_setUcs__SWIG_1(this.swigCPtr, (int)viewType, OdDbDatabase.getCPtr(pDb));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUcs(OrthographicView viewType)
		{
			TD_DbPINVOKE.OdDbViewport_setUcs__SWIG_2(this.swigCPtr, (int)viewType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUcs(OdDbObjectId ucsId)
		{
			TD_DbPINVOKE.OdDbViewport_setUcs__SWIG_3(this.swigCPtr, OdDbObjectId.getCPtr(ucsId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUcsToWorld()
		{
			TD_DbPINVOKE.OdDbViewport_setUcsToWorld(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setElevation(double elevation)
		{
			TD_DbPINVOKE.OdDbViewport_setElevation(this.swigCPtr, elevation);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isUcsSavedWithViewport()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isUcsSavedWithViewport(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setUcsPerViewport(bool ucsPerViewport)
		{
			TD_DbPINVOKE.OdDbViewport_setUcsPerViewport(this.swigCPtr, ucsPerViewport);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setRenderMode(RenderMode renderMode)
		{
			TD_DbPINVOKE.OdDbViewport_setRenderMode(this.swigCPtr, (int)renderMode);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public RenderMode renderMode()
		{
			RenderMode result = (RenderMode)TD_DbPINVOKE.OdDbViewport_renderMode(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbViewport.ShadePlotType shadePlot()
		{
			OdDbViewport.ShadePlotType result = (OdDbViewport.ShadePlotType)TD_DbPINVOKE.OdDbViewport_shadePlot(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setShadePlot(OdDbViewport.ShadePlotType shadePlot)
		{
			TD_DbPINVOKE.OdDbViewport_setShadePlot__SWIG_0(this.swigCPtr, (int)shadePlot);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId shadePlotId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbViewport_shadePlotId(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setShadePlot(OdDbViewport.ShadePlotType type, OdDbObjectId shadePlotId)
		{
			TD_DbPINVOKE.OdDbViewport_setShadePlot__SWIG_1(this.swigCPtr, (int)type, OdDbObjectId.getCPtr(shadePlotId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool plotWireframe()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_plotWireframe(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool plotAsRaster()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_plotAsRaster(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId background()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbViewport_background(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBackground(OdDbObjectId backgroundId)
		{
			TD_DbPINVOKE.OdDbViewport_setBackground(this.swigCPtr, OdDbObjectId.getCPtr(backgroundId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId visualStyle()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbViewport_visualStyle(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new void setVisualStyle(OdDbObjectId visualStyle)
		{
			TD_DbPINVOKE.OdDbViewport_setVisualStyle(this.swigCPtr, OdDbObjectId.getCPtr(visualStyle));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isDefaultLightingOn()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isDefaultLightingOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDefaultLightingOn(bool on)
		{
			TD_DbPINVOKE.OdDbViewport_setDefaultLightingOn(this.swigCPtr, on);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGiViewportTraits.DefaultLightingType defaultLightingType()
		{
			OdGiViewportTraits.DefaultLightingType result = (OdGiViewportTraits.DefaultLightingType)TD_DbPINVOKE.OdDbViewport_defaultLightingType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDefaultLightingType(OdGiViewportTraits.DefaultLightingType typ)
		{
			TD_DbPINVOKE.OdDbViewport_setDefaultLightingType(this.swigCPtr, (int)typ);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double brightness()
		{
			double result = TD_DbPINVOKE.OdDbViewport_brightness(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBrightness(double arg0)
		{
			TD_DbPINVOKE.OdDbViewport_setBrightness(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double contrast()
		{
			double result = TD_DbPINVOKE.OdDbViewport_contrast(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setContrast(double arg0)
		{
			TD_DbPINVOKE.OdDbViewport_setContrast(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmColor ambientLightColor()
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbViewport_ambientLightColor(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setAmbientLightColor(OdCmColor clr)
		{
			TD_DbPINVOKE.OdDbViewport_setAmbientLightColor(this.swigCPtr, OdCmColor.getCPtr(clr));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId sunId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbViewport_sunId(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId setSun(OdDbSun pSun)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbViewport_setSun(this.swigCPtr, OdDbSun.getCPtr(pSun));
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void toneOperatorParameters(OdGiToneOperatorParameters arg0)
		{
			TD_DbPINVOKE.OdDbViewport_toneOperatorParameters(this.swigCPtr, OdGiToneOperatorParameters.getCPtr(arg0));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setToneOperatorParameters(OdGiToneOperatorParameters arg0)
		{
			TD_DbPINVOKE.OdDbViewport_setToneOperatorParameters(this.swigCPtr, OdGiToneOperatorParameters.getCPtr(arg0));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdResult setAnnotationScale(OdDbAnnotationScale pScaleObj)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbViewport_setAnnotationScale(this.swigCPtr, OdDbAnnotationScale.getCPtr(pScaleObj));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbAnnotationScale annotationScale()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbViewport_annotationScale(this.swigCPtr);
			OdDbAnnotationScale result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbAnnotationScale)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbAnnotationScale)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbAnnotationScale)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isGridBoundToLimits()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isGridBoundToLimits(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setGridBoundToLimits(bool bNewVal)
		{
			TD_DbPINVOKE.OdDbViewport_setGridBoundToLimits(this.swigCPtr, bNewVal);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isGridAdaptive()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isGridAdaptive(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setGridAdaptive(bool bNewVal)
		{
			TD_DbPINVOKE.OdDbViewport_setGridAdaptive(this.swigCPtr, bNewVal);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isGridSubdivisionRestricted()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isGridSubdivisionRestricted(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setGridSubdivisionRestricted(bool bNewVal)
		{
			TD_DbPINVOKE.OdDbViewport_setGridSubdivisionRestricted(this.swigCPtr, bNewVal);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isGridFollow()
		{
			bool result = TD_DbPINVOKE.OdDbViewport_isGridFollow(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setGridFollow(bool bNewVal)
		{
			TD_DbPINVOKE.OdDbViewport_setGridFollow(this.swigCPtr, bNewVal);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public ushort gridMajor()
		{
			ushort result = TD_DbPINVOKE.OdDbViewport_gridMajor(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setGridMajor(ushort arg0)
		{
			TD_DbPINVOKE.OdDbViewport_setGridMajor(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGsView gsView()
		{
			OdGsView result = (OdGsView)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbViewport_gsView(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setGsView(OdGsView arg0)
		{
			TD_DbPINVOKE.OdDbViewport_setGsView(this.swigCPtr, OdGsView.getCPtr(arg0));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void subSetDatabaseDefaults(OdDbDatabase pDb, bool doSubents)
		{
			TD_DbPINVOKE.OdDbViewport_subSetDatabaseDefaults(this.swigCPtr, OdDbDatabase.getCPtr(pDb), doSubents);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dwgInFields(OdDbDwgFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbViewport_dwgInFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dwgOutFields(OdDbDwgFiler pFiler)
		{
			TD_DbPINVOKE.OdDbViewport_dwgOutFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbViewport_dxfInFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDbViewport_dxfOutFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields_R12(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbViewport_dxfInFields_R12(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields_R12(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDbViewport_dxfOutFields_R12(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult subGetClassID(IntPtr pClsid)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbViewport_subGetClassID(this.swigCPtr, pClsid);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void subClose()
		{
			TD_DbPINVOKE.OdDbViewport_subClose(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult subErase(bool erasing)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbViewport_subErase(this.swigCPtr, erasing);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void zoomExtents()
		{
			TD_DbPINVOKE.OdDbViewport_zoomExtents(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult subGetGeomExtents(OdGeExtents3d extents)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbViewport_subGetGeomExtents(this.swigCPtr, OdGeExtents3d.getCPtr(extents));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult subTransformBy(OdGeMatrix3d xfm)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbViewport_subTransformBy(this.swigCPtr, OdGeMatrix3d.getCPtr(xfm));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void modified(OdDbObject pObj)
		{
			TD_DbPINVOKE.OdDbViewport_modified(this.swigCPtr, OdDbObject.getCPtr(pObj));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void erased(OdDbObject pObj, bool pErasing)
		{
			TD_DbPINVOKE.OdDbViewport_erased(this.swigCPtr, OdDbObject.getCPtr(pObj), pErasing);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult subGetTransformedCopy(OdGeMatrix3d mat, out OdDbEntity pCopy)
		{
			IntPtr zero = IntPtr.Zero;
			OdResult result;
			try
			{
				OdResult odResult = (OdResult)TD_DbPINVOKE.OdDbViewport_subGetTransformedCopy(this.swigCPtr, OdGeMatrix3d.getCPtr(mat), out zero);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
				result = odResult;
			}
			finally
			{
				pCopy = (OdDbEntity)Teigha.Core.Helpers.odrxCreateObjectInternal(zero, true);
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		public enum StandardScaleType
		{
			kScaleToFit,
			kCustomScale,
			k1_1,
			k1_2,
			k1_4,
			k1_5,
			k1_8,
			k1_10,
			k1_16,
			k1_20,
			k1_30,
			k1_40,
			k1_50,
			k1_100,
			k2_1,
			k4_1,
			k8_1,
			k10_1,
			k100_1,
			k1_128in_1ft,
			k1_64in_1ft,
			k1_32in_1ft,
			k1_16in_1ft,
			k3_32in_1ft,
			k1_8in_1ft,
			k3_16in_1ft,
			k1_4in_1ft,
			k3_8in_1ft,
			k1_2in_1ft,
			k3_4in_1ft,
			k1in_1ft,
			k1and1_2in_1ft,
			k3in_1ft,
			k6in_1ft,
			k1ft_1ft
		}

		public enum ShadePlotType
		{
			kAsDisplayed,
			kWireframe,
			kHidden,
			kRendered,
			kVisualStyle,
			kRenderPreset
		}
	}
}
